package com.feng.cloud.auth.controller;

import com.feng.cloud.auth.service.ValidateCodeService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @ClassName ValidateCodeController
 * @Description 验证码
 * @Author Better Feng
 * @Date 2019/12/16 13:42
 * @Version 1.0
 **/
@RestController
@RequiredArgsConstructor
public class ValidateCodeController {

    private final ValidateCodeService validateCodeService;

    @GetMapping("captcha")
    public void captcha(HttpServletRequest request, HttpServletResponse response) throws IOException {
        validateCodeService.create(request, response);
    }

}
